package com.example.lib_base.room

import android.app.Application
import androidx.room.Room

/**
 * 数据库工具类
 */
class AppDbUtils {
    companion object{
        private lateinit var appDataBase: AppDataBase
        //初始化
        fun init(application: Application){
            appDataBase = Room.databaseBuilder(application,AppDataBase::class.java,"2306A.db")
                .allowMainThreadQueries()
                .build()
        }
        //对外暴露
        fun getAppDb() = appDataBase
    }
}